package com.ztesoft.web.common.customdb.dao;

import java.util.List;

import javax.annotation.Resource;

import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;

import com.ztesoft.web.common.customdb.dao.mapper.IEnumListCustomMapper;

/**
 * @Description 枚举类自定义DAO
 * @author lin.weibin@zte.com.cn
 * @date 2015年8月6日 下午8:13:10
 * @since 1.0
 *
 */
@Repository
public class EnumListCustomDao extends SqlSessionDaoSupport {

    @Resource(name = "majorSqlSessionTemplate")
    public void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate) {
        super.setSqlSessionTemplate(sqlSessionTemplate);
    }

    public IEnumListCustomMapper getMapper() {
    	return getSqlSession().getMapper(IEnumListCustomMapper.class);
    }

//    @Cacheable(value="dmsCache",key="#this+#enumCode+#sysId")
    public List<String> selectByEnumCodeAndModuleId(String enumCode, int sysId) {
    	return getMapper().selectByEnumCodeAndModuleId(enumCode, sysId);
    }
}
